Dynomotion

Group: DynoMotion Message: 12269 From: Hardy Family Date: 9/17/2015
Subject: Running g-code directly on the kflop
Hi Tom,

We are investigating the feasibility of interpreting g-code on the kflop, and would like your opinion.

Many of the machines we sell are designed to mass-produce a limited set of parts, and the controller and machine are often used as a component in a larger manufacturing set-up.  Typically, the controller runs stand-alone (no PC, except to program or diagnose problems).

Currently, we handle this by writing custom C code for each application, but we would like to be able to offer customers the option of writing their own "scripting" so that they have more flexibility and do not have to contract with us for every small modification.  Customers are almost never proficient in C, but are usually familiar with G-code, so the latter seems like a good choice for allowing some manufacturing flexibility.

So the question is, would it be possible to port RS274-NGC to the kflop?  It looks possible (I have ported it to a smaller 8-bit processor before) so the main questions relate to implementing the "canonical functions" and reducing it to plain C from C++.  There seem to be comprehensive kflop APIs for coordinated motion control, but I am not sure, since I haven't had to use anything more sophisticated than MoveAtVel().  Maybe there would be issues with maintaining sufficient motion buffer lookahead.

Since we use CL6X for everything now, maybe we could leave it as C++.

Ideally, we would like such an interpreter to be functionally identical to the implementation on the PC, although we would probably have to modify the way it handles custom M-codes and the like, and obviously the way it accesses files.  The g-code itself would be stored on the spare flash memory.  Maybe write a quick-and-dirty flash file system.

Of course, the alternative is to add a Raspberry Pi (running KMotion stuff) to the system, which already works and has some advantages such as TCP/IP and much more storage, but still it would be an elegant solution to have it all done in the kflop.

Regards,
SJH

Group: DynoMotion Message: 12272 From: Tom Kerekes Date: 9/17/2015
Subject: Re: Running g-code directly on the kflop
Hi SJH,

I suspect that might be possible but a significant task.  The Trajectory Planner would also be required.  Although I believe someone claimed to have ported it to run in KFLOP.

Here is another idea you may or may not like: one User made a stand alone cake decorating machine that dispensed something like "Happy Birthday" over and over again.  He used a PC + KMotionCNC to run the GCode Job once.  He then captured KFLOP's Coordinated Motion Buffer as a binary image to FLASH and restored it after a power cycle.

I think I prefer the RPI2 solution.

Regards
TK